import {
  createRouter,
  createWebHistory,
  Router,
  RouteRecordRaw,
} from "vue-router";

const routes: RouteRecordRaw[] = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    name: "home",
    component: () => import("@/views/home/index.vue"),
  },
  {
    path: "/design",
    name: "design",
    component: () => import("@/views/design/index.vue"),
  },
  {
    path: "/workbench",
    name: "workbench",
    component: () => import("@/views/workbench/index.vue"),
  },
  {
    path: "/flow",
    name: "flow",
    component: () => import("@/views/flow/index.vue"),
  },
];

const router: Router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
